<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>修改用户信息</title>
  <!-- Bootstrap Styles-->
  <link rel="stylesheet" type="text/css"  th:href="@{/css/text/bootstrap.css}"/>
  <link rel="stylesheet" type="text/css"  th:href="@{/css/text/bootstrap-theme.min.css}"/>
  <link rel="stylesheet" type="text/css"  th:href="@{/css/text/bootstrap-admin-theme.css}"/>
  <!-- FontAwesome Styles-->
  <link rel="stylesheet" type="text/css"  th:href="@{/css/text/font-awesome.css}"/>
  <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">

  <script th:src="@{/js/JQuery2.1.4.js}"></script>

  <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body class="bootstrap-admin-with-small-navbar">
<nav class="navbar navbar-default navbar-inverse navbar-fixed-top " role="navigation">
  <div class="container">
    <div class="row">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse"
                data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" th:href="@{../user/index}">GMS</a>
      </div>
      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
          <li class="active"><a th:href="@{../user/index}">首页</a></li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">场地<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a th:href="@{../toPlaceApply1}">预约场地</a></li>
              <li><a th:href="@{../toPlaceUse}">场地使用</a></li>
              <li><a th:href="@{../toUserPlaceApply}">预约退订</a></li>
              <li><a th:href="@{../toStanderDetail}">场地收费标准</a></li>
            </ul>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">器材<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a th:href="@{../equipment/showEquipment}" >租借</a></li>
            </ul>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">赛事<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a th:href="@{../event/touserevent(pageNum=1,userId=${session.username})}">我的赛事</a></li>
              <li><a th:href="@{../event/toeventcreate}">创建赛事</a></li>
            </ul>
          </li>
          <li class="active">
            <a th:href="@{../notice/tonoticeuser}">网站公告</a>
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li th:if="${session.permission}!='0'" ><a th:href="@{../management}">管理后台</a></li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">用户<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a th:href="@{../user/toChangeuser}">修改资料</a></li>
              <li><a th:href="@{../user/toChangepassword}">修改密码</a></li>
              <li class="divider"></li>
              <li><a th:href="@{/login}">退出登录</a></li>
            </ul>
          </li>
        </ul>
      </div><!-- /.navbar-collapse -->
    </div>
  </div>
</nav>

  <!-- /. NAV SIDE  -->
  <div id="page-wrapper" class="container">
    <div id="page-inner" class="row">
      <div class="col-md-10">
        <div class="row">
          <form th:action="@{../user/updateUser}" class="form-horizontal">
            <fieldset>
              <legend>修改用户信息</legend>
              <div class="form-group">
                <!-- label表示文字提示标签,可以通过表单的组建的id提示-->
                <label class="col-md-2 control-label" >账号:</label>
                <div class="col-md-4">
                  <label class="col-md-2 control-label" th:text="${session.user.aNumber}"></label>
                </div>
              </div>
              <div class="form-group">
                <!-- label表示文字提示标签,可以通过表单的组建的id提示-->
                <label class="col-md-2 control-label" for="userName">用户名:</label>
                <div class="col-md-4">
                  <input class="form-control" type="text"  required="required" name="userName"
                         th:value="${session.user.userName}"id="userName" pattern="^[\u4e00-\u9fa5]{1,7}$|^[\dA-Za-z_]{1,14}$" title="请输入符合格式的用户名"/>
                </div>
              </div>
              <div class="form-group">
                <label class="col-md-2 control-label">性别:</label>
                <div class="col-md-5">
                  <select name="sex" th:value="${session.user.sex}">
                    <option value="男">男</option>
                    <option value="女">女</option>
                  </select>
                </div>
              </div>
              <div class="form-group">
                <!-- label表示文字提示标签,可以通过表单的组建的id提示-->
                <label class="col-md-2 control-label" for="academy">学院:</label>
                <div class="col-md-4">
                  <input class="form-control" type="text"  required="required" name="academy"
                         th:value="${session.user.academy}"id="academy"/>
                </div>
              </div>
              <div class="form-group">
                <!-- label表示文字提示标签,可以通过表单的组建的id提示-->
                <label class="col-md-2 control-label" >学号/教工号</label>
                <div class="col-md-4">
                  <label class="col-md-2 control-label" th:text="${session.user.number}"></label>
                </div>
              </div>
              <div class="form-group">
                <!-- label表示文字提示标签,可以通过表单的组建的id提示-->
                <label class="col-md-2 control-label" >身份</label>
                <div class="col-md-4">
                  <label class="col-md-2 control-label" th:text="${session.user.identity}"></label>
                </div>
              </div>
              <div class="form-group">
                <div class="col-md-6 col-md-offset-3">
                  <input class="btn btn-primary" type="submit" value="修改"/>
                </div>
              </div>
            </fieldset>
          </form>
        </div>
      </div>
    </div>
  </div>
</body>
</html>